extends Line2D

const SCREEN_X := 12800
const SCREEN_Y := 7200

var fake_value:Vector2:
	set(v):
		fake_value = v
		points[1] = v
		points[0] = -1*v
func set_verline_animation(bo:bool,sec:float = 0.5) -> void:
	var tween = create_tween()
	tween.set_ignore_time_scale(true)
	if bo:
		tween.tween_property(self,"fake_value",Vector2(0,SCREEN_Y),sec).set_ease(Tween.EASE_IN_OUT)\
		.set_trans(Tween.TRANS_CUBIC)
	else:
		tween.tween_property(self,"fake_value",Vector2.ZERO,sec).set_ease(Tween.EASE_IN_OUT)\
		.set_trans(Tween.TRANS_CUBIC)
		

func set_horline_animation(bo:bool,sec:float = 0.5) -> void:
	var tween = create_tween()
	tween.set_ignore_time_scale(true)
	if bo:
		tween.tween_property(self,"fake_value",Vector2(SCREEN_X,0),sec).set_ease(Tween.EASE_IN_OUT)\
		.set_trans(Tween.TRANS_CUBIC)
	else:
		tween.tween_property(self,"fake_value",Vector2.ZERO,sec).set_ease(Tween.EASE_IN_OUT)\
		.set_trans(Tween.TRANS_CUBIC)
	
